#include "commonexception.h"

const char* RangeException::what() const noexcept
{
    bufForWhat_.resize(0);
    bufForWhat_.appendFormat("%s;needSize: %zu;userProvideSize: %zu",
                             functionName_.constData(),
                             needSize_,userProvideSize_);
    return bufForWhat_.constData();
}

const char* Exception::what() const noexcept
{
    buf_for_what_.resize(0);
    buf_for_what_.appendFormat("%s;errnum: %d;err: %s",
                               fName_.constData(),
                               errnum_,
                               errstr_.constData());
    return buf_for_what_.constData();
}
